/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgAndroidVersion extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgAndroidVersion";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_VERSION_CODE = "versionCode";
	public static final String ALIAS_UPDATE_LOG = "updateLog";
	public static final String ALIAS_DOWNLOAD_URL = "downloadUrl";
	public static final String ALIAS_VERSION_NAME = "versionName";
	public static final String ALIAS_CREATE_DATE = "createDate";
	
	//date formats
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */	
	
	private java.lang.Integer id;
    /**
     * versionCode       db_column: versionCode 
     */	
	
	private String versionCode;
    /**
     * updateLog       db_column: updateLog 
     */	
	private java.lang.String updateLog;
    /**
     * downloadUrl       db_column: downloadUrl 
     */	
	private java.lang.String downloadUrl;
    /**
     * versionName       db_column: versionName 
     */	
	private java.lang.String versionName;
    /**
     * createDate       db_column: createDate 
     */	
	
	private java.util.Date createDate;

	public SmgAndroidVersion(){
	}

	public SmgAndroidVersion(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setVersionCode(String value) {
		this.versionCode = value;
	}
	
	public String getVersionCode() {
		return this.versionCode;
	}
	public void setUpdateLog(java.lang.String value) {
		this.updateLog = value;
	}
	
	public java.lang.String getUpdateLog() {
		return this.updateLog;
	}
	public void setDownloadUrl(java.lang.String value) {
		this.downloadUrl = value;
	}
	
	public java.lang.String getDownloadUrl() {
		return this.downloadUrl;
	}
	public void setVersionName(java.lang.String value) {
		this.versionName = value;
	}
	
	public java.lang.String getVersionName() {
		return this.versionName;
	}
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}
	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,java.util.Date.class));
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("VersionCode",getVersionCode())
			.append("UpdateLog",getUpdateLog())
			.append("DownloadUrl",getDownloadUrl())
			.append("VersionName",getVersionName())
			.append("CreateDate",getCreateDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgAndroidVersion == false) return false;
		if(this == obj) return true;
		SmgAndroidVersion other = (SmgAndroidVersion)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

